package com.bandaotixi.cashier.api.common.model;

import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * 键值对
 */
@Data
@NoArgsConstructor
public class KeyValue<K, T> {

    public KeyValue(K key, T value) {
        this.key = key;
        this.value = value;
    }

    public static <PK, P> KeyValue<PK, P> of(PK key, P value) {
        return new KeyValue<>(key, value);
    }
    public static <PK, P> KeyValue<PK, P> just(PK key, P value) {
        return new KeyValue<>(key, value);
    }

    private K key;

    private T value;

}
